package com.sky.mapper;

import com.sky.dto.SetmealPageQueryDTO;
import com.sky.entity.Setmeal;
import com.sky.entity.SetmealDish;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface SetmealDishMapper {
    /**
     * 对套餐菜品关系表进行新增
     * @param setmealDishes
     */
    void saveSetmealDish(List<SetmealDish> setmealDishes);

    /**
     * 查询套餐菜品
     * @param id
     * @return
     */
    List<SetmealDish> getDishesBySetmealId(Long id);

    void updateSetmealDish(List<SetmealDish> setmealDishes);

    @Delete(("delete from setmeal_dish where id=#{id}"))
    void deleteBySetmealId(Long id);
}
